package com.huawei.appmarket.service.appdetail.view.card;

import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import com.huawei.appgallery.jsonkit.api.JsonBean;
import com.huawei.appmarket.service.appdetail.bean.detail.DetailWatchCardBean;
import java.util.List;
import o.azb;
import o.drl;
import o.ewm.h;
import o.ewm.j;

public class DetailWatchCard extends drl {
    private LinearLayout ʼ;
    private LinearLayout ॱॱ;

    public View ˊ(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        this.ˊ = layoutInflater.inflate(h.ॱʼ, null);
        azb.ˏ(this.ˊ);
        this.ॱॱ = (LinearLayout) this.ˊ.findViewById(j.ᐝꞌ);
        this.ʼ = (LinearLayout) this.ˊ.findViewById(j.ᐝﾟ);
        return this.ˊ;
    }

    public boolean ˊ(List<JsonBean> list) {
        if (list == null || list.size() <= 0) {
            return false;
        }
        DetailWatchCardBean detailWatchCardBean = (DetailWatchCardBean) list.get(0);
        if (detailWatchCardBean == null || (TextUtils.isEmpty(detailWatchCardBean.ˊ()) && TextUtils.isEmpty(detailWatchCardBean.ॱ()))) {
            return false;
        }
        ˎ(this.ॱॱ, detailWatchCardBean.ˊ());
        ˎ(this.ʼ, detailWatchCardBean.ॱ());
        return true;
    }

    private void ˎ(View view, String str) {
        if (view != null) {
            if (TextUtils.isEmpty(str)) {
                view.setVisibility(8);
            } else {
                view.setVisibility(0);
            }
        }
    }
}
